package com.scau.common.exception;

import com.scau.common.constants.HttpCode;

/**
 * Created by honghua.dong on 2017/2/19.
 */
public class StatusException extends RuntimeException{

    private int code;

    public StatusException(int code, String message) {
        super(message);
        this.code = code;
    }

    public StatusException(HttpCode.Error error) {
        super(error.getMessage());
        this.code = error.getCode();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
